package com.sky.service.user;


import com.sky.pojo.AddressBook;
import com.sky.result.Result;

import java.util.List;

public interface AddressBookService {

    /**
     * 根据条件查询地址
     * @param addressBook
     * @return
     */
    Result<List<AddressBook>> list(AddressBook addressBook);

    /**
     * 新增地址
     * @param addressBook
     * @return
     */
    Result<String> add(AddressBook addressBook);

    /**
     * 根据ID查询地址
     * @param id
     * @return
     */
    Result<AddressBook> findById(Long id);

    /**
     * 更新
     * @param addressBook
     * @return
     */
    Result<String> update(AddressBook addressBook);

    /**
     * 设置默认地址
     * @param addressBook
     * @return
     */
    Result<String> setDefault(AddressBook addressBook);

    /**
     * 根据ID删除
     * @param id
     * @return
     */
    Result<String> deleteById(Long id);

    Result<AddressBook> findDefault(AddressBook addressBook);
}